﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DangKyControl.ascx.cs"
    Inherits="TMDT.Web.UI.Controls.DangKyControl" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<table>
    <tr>
        <td colspan="3">
            <asp:Label ID="lblError" runat="server" CssClass="error"></asp:Label>
        </td>
    </tr>
    <tr>
        <td>
            Tên đăng nhập:
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtTenDangNhap" Text="" CssClass="text"></asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtTenDangNhap" ErrorMessage="Chưa nhập tên đăng nhập" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Mật khẩu:</td>
        <td>
            <asp:TextBox runat="server" ID="txtMatKhau" Text="" CssClass="text" 
                TextMode="Password"></asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtMatKhau" ErrorMessage="Chưa nhập mật khẩu" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Nhập lại mật khẩu:</td>
        <td>
            <asp:TextBox runat="server" ID="txtNhapLaiMatKhau" Text="" CssClass="text" 
                TextMode="Password"></asp:TextBox>
        </td>
        <td>
            <asp:CompareValidator ID="CompareValidator1" runat="server" 
                ControlToCompare="txtMatKhau" ControlToValidate="txtNhapLaiMatKhau" 
                ErrorMessage="Nhập lại mật khẩu sai" ValidationGroup="vgDangKy"></asp:CompareValidator>
        </td>
    </tr>
    <tr>
        <td>
            Họ và tên:
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtHoTen" Text="" CssClass="text"></asp:TextBox>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtHoTen" ErrorMessage="Chưa nhập họ tên" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            CMND:</td>
        <td>
            <asp:TextBox runat="server" ID="txtCMND" Text="" CssClass="text"></asp:TextBox>
            <asp:FilteredTextBoxExtender ID="txtCMND_FilteredTextBoxExtender" 
                runat="server" Enabled="True" FilterInterval="9" FilterType="Numbers" 
                TargetControlID="txtCMND">
            </asp:FilteredTextBoxExtender>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ControlToValidate="txtCMND" ErrorMessage="Chưa nhập CMND" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Giới tính:
        </td>
        <td>
            <asp:DropDownList ID="ddlGioiTinh" runat="server">
                <asp:ListItem Value="Nam"></asp:ListItem>
                <asp:ListItem Value="Nữ"></asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
            Ngày sinh: 
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtNgaySinh" Text="" CssClass="text"></asp:TextBox>
            <asp:CalendarExtender ID="txtNgaySinh_CalendarExtender" runat="server" 
                Enabled="True" TargetControlID="txtNgaySinh" Format="dd/MM/yyyy" 
                PopupButtonID="imgCalendar">
            </asp:CalendarExtender>
            <img id="imgCalendar" src="../Images/calendar.png" height="25px" width="25px"/>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtNgaySinh" ErrorMessage="Chưa nhập ngày sinh" 
                ValidationGroup="vgDangKy" InitialValue="r"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Email: 
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtEmail" Text="" CssClass="text"></asp:TextBox>
        </td>
        <td>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtEmail" ErrorMessage="Nhập sai định dạng Email" 
                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                ValidationGroup="vgDangKy" Display="Dynamic"></asp:RegularExpressionValidator>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="Chưa nhập Email" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
          Điện thoại:
        </td>
        <td>
            <asp:TextBox runat="server" ID="txtDienThoai" Text="" CssClass="text" 
                ></asp:TextBox>
            <asp:FilteredTextBoxExtender ID="txtDienThoai_FilteredTextBoxExtender" 
                runat="server" Enabled="True" FilterInterval="11" FilterType="Numbers" 
                TargetControlID="txtDienThoai">
            </asp:FilteredTextBoxExtender>
        </td>
        <td>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                ControlToValidate="txtCMND" ErrorMessage="Chưa nhập số điện thoại" 
                ValidationGroup="vgDangKy"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            Tỉnh/Thành phố: 
        </td>
        <td>
            <asp:DropDownList runat="server" ID="ddlTinhThanhPho">
            </asp:DropDownList>
        </td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
        </td>
    </tr>
    <tr>
        <td>
        </td>
        <td>
            <asp:Button ID="btnDangKy" runat="server" Text="Đăng ký" 
                onclick="btnDangKy_Click" ValidationGroup="vgDangKy" />&nbsp;&nbsp;
            <asp:Button ID="btnLamMoi" runat="server" Text="Làm mới" 
                onclick="btnLamMoi_Click" />
        </td>
    </tr>
</table>
